import 'package:flutter_rust_bridge/flutter_rust_bridge.dart';

extension AnyhowErrorParser on AnyhowException {

  String parseMessage() {
    return message.replaceAll(RegExp(r'\s*'), "")
        .split(RegExp(r'Stack'))[0]
    .replaceAll(RegExp(r'\(oserror\d*\)'), "");
  }
}
